/*
 * $Id$
 *
 * Copyright 2008 HuangHuang. All rights reserved.
 */
package com.crm.dao.impl;

import com.crm.dao.IListboxDao;
import com.crm.model.Listbox;

import java.util.List;

/**
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 */
public class ListboxDao extends BaseDao implements IListboxDao {

    /**
     * {@inheritDoc}
     */
    public List<Listbox> getList(String listboxName) {
        return getHibernateTemplate().find("from " + listboxName);
    }

    /**
     * {@inheritDoc}
     */
    public void saveOrUpdate(Listbox listbox) {
        getHibernateTemplate().saveOrUpdate(listbox);
    }

    /**
     * {@inheritDoc}
     */
    public void delete(Listbox listbox) throws Exception{
        getHibernateTemplate().delete(listbox);
    }
}
